$(function () {

    $.ajax({
        type: "POST",
        url: "../../wordUserAction/isLogin.json",
        success: function (data) {
            var obj = data.data.obj;
            if (obj == null) {
                logout();
            }
            // alert(data);
        },
        error: function () {
            alert("失败！服务器错误！");
        }
    });

});


var logout = function () {
    // delCookie("JSESSIONID");

    $.ajax({
        type: "POST",
        url: "../../wordUserAction/logout.json",
        success: function (data) {
            // alert("sususu");
        },
        error: function () {
            alert("失败！服务器错误！");
        }
    });


    window.location.href = '/logout.html';
};


